package sample4.provider.dml;

import android.content.ContentResolver;
import android.content.ContentValues;
import android.net.Uri;

/**
 * <pre>
 * ...
 * SqliteInsertBuilder sql = new SqliteInsertBuilder(uri);
 * sql.addContentValue("name", "abcd");
 * Uri newUri = sql.insert(getContentResolver());
 * ...
 * </pre>
 */
public class SqliteInsertBuilder extends AbsDmlBuilder {
    ContentValues mValues = new ContentValues();

    /**
     * コンストラクタ
     * 
     * @param uri 挿入対象
     */
    public SqliteInsertBuilder(Uri uri) {
        super(uri);
    }

    /**
     * 初期化する
     */
    public void clear() {
        mValues.clear();
    }

    /**
     * 挿入するレコードのカラム値を設定する
     * 
     * @param key カラム名
     * @param value カラム値
     */
    public void addContentValue(String key, Boolean value) {
        mValues.put(key, value);
    }

    /**
     * 挿入するレコードのカラム値を設定する
     * 
     * @param key カラム名
     * @param value カラム値
     */
    public void addContentValue(String key, Byte value) {
        mValues.put(key, value);
    }

    /**
     * 挿入するレコードのカラム値を設定する
     * 
     * @param key カラム名
     * @param value カラム値
     */
    public void addContentValue(String key, byte[] value) {
        mValues.put(key, value);
    }

    /**
     * 挿入するレコードのカラム値を設定する
     * 
     * @param key カラム名
     * @param value カラム値
     */
    public void addContentValue(String key, Double value) {
        mValues.put(key, value);
    }

    /**
     * 挿入するレコードのカラム値を設定する
     * 
     * @param key カラム名
     * @param value カラム値
     */
    public void addContentValue(String key, Float value) {
        mValues.put(key, value);
    }

    /**
     * 挿入するレコードのカラム値を設定する
     * 
     * @param key カラム名
     * @param value カラム値
     */
    public void addContentValue(String key, Integer value) {
        mValues.put(key, value);
    }

    /**
     * 挿入するレコードのカラム値を設定する
     * 
     * @param key カラム名
     * @param value カラム値
     */
    public void addContentValue(String key, Long value) {
        mValues.put(key, value);
    }

    /**
     * 挿入するレコードのカラム値を設定する
     * 
     * @param key カラム名
     * @param value カラム値
     */
    public void addContentValue(String key, Short value) {
        mValues.put(key, value);
    }

    /**
     * 挿入するレコードのカラム値を設定する
     * 
     * @param key カラム名
     * @param value カラム値
     */
    public void addContentValue(String key, String value) {
        mValues.put(key, value);
    }

    /**
     * レコードを挿入する
     * 
     * @param contentResolver
     * @return 挿入されたレコードのuri
     */
    public Uri insert(ContentResolver contentResolver) {
        return contentResolver.insert(mUri, mValues);
    }

    // -----------Unsupported method
    /**
     * Unsupported operation
     * 
     * @param otherWheres
     * @return SqliteWhereBuilder
     */
    public SqliteWhereBuilder addAndWhere(SqliteWhereBuilder... otherWheres) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param otherWheres
     * @return SqliteWhereBuilder
     */
    public SqliteWhereBuilder addOrWhere(SqliteWhereBuilder... otherWheres) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param arg
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addAndEquals(String column, String arg) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param arg
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addAndNotEquals(String column, String arg) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param args
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addAndIn(String column, String... args) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param args
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addAndNotIn(String column, String... args) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param arg
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addAndLike(String column, String arg) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param arg
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addAndNotLike(String column, String arg) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addAndIsNull(String column) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addAndIsNotNull(String column) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param arg
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addOrEquals(String column, String arg) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param arg
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addOrNotEquals(String column, String arg) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param args
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addOrIn(String column, String... args) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param args
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addOrNotIn(String column, String... args) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param arg
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addOrLike(String column, String arg) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param arg
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addOrNotLike(String column, String arg) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addOrIsNull(String column) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addOrIsNotNull(String column) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param arg
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addAndEquals(String column, Number arg) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param arg
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addAndNotEquals(String column, Number arg) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param args
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addAndIn(String column, Number... args) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param args
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addAndNotIn(String column, Number... args) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param arg
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addAndLessThan(String column, Number arg) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param arg
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addAndGreaterThan(String column, Number arg) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param arg
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addAndLessThanOrEquals(String column, Number arg) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param arg
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addAndGreaterThanOrEquals(String column, Number arg) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param lessThan
     * @param greaterThan
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addAndBetween(String column, Number lessThan, Number greaterThan) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param lessThan
     * @param greaterThan
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addAndNotBetween(String column, Number lessThan, Number greaterThan) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param arg
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addOrEquals(String column, Number arg) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param arg
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addOrNotEquals(String column, Number arg) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param args
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addOrIn(String column, Number... args) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param args
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addOrNotIn(String column, Number... args) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param arg
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addOrLessThan(String column, Number arg) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param arg
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addOrGreaterThan(String column, Number arg) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param arg
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addOrLessThanOrEquals(String column, Number arg) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param arg
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addOrGreaterThanOrEquals(String column, Number arg) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param lessThan
     * @param greaterThan
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addOrBetween(String column, Number lessThan, Number greaterThan) {
        throw new UnsupportedOperationException();
    }

    /**
     * Unsupported operation
     * 
     * @param column
     * @param lessThan
     * @param greaterThan
     * @return UnsupportedOperation
     */
    public SqliteWhereBuilder addOrNotBetween(String column, Number lessThan, Number greaterThan) {
        throw new UnsupportedOperationException();
    }

    public String getWhere() {
        throw new UnsupportedOperationException();
    }

    public String[] getWhereArgs() {
        throw new UnsupportedOperationException();
    }
}
